<?php

date_default_timezone_set('UTC');

$time = date("F j, Y, g:i:s a");

$file = 'cronlogs.txt';
$errorfile = 'errors.txt';

$message = $time . " - Database updated !\n";

try {
	file_put_contents($file, $message, FILE_APPEND | LOCK_EX);
} catch(Exception $e)
{
	$error = $time . 'There was an error: ' . $e;
	file_put_contents($errorfile, $error, FILE_APPEND | LOCK_EX);
}
